package com.itdianzi.text;

import com.itdianzi.domain.company.Company;
import com.itdianzi.dao.company.CompanyDao;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;
import java.util.List;

public class TextDemo {

    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("classpath:spring/applicationContext-dao.xml");
        CompanyDao companyDao = ac.getBean(CompanyDao.class);
        List<Company> companyList = companyDao.findAll();
        System.out.println(companyList);
    }
}
